package com.haizhi.crm.sys.auth.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yangyijun on 2018/5/17.
 */
@Data
@NoArgsConstructor
public class ResourcePermissionVo {
    private Long resourceId;
    private Long parentResourceId;
    private Long permissionId;
    private String permissionName;
    private List<ResourcePermissionVo> subs = new ArrayList<>();

    public ResourcePermissionVo(Long resourceId, Long parentResourceId, Long permissionId, String permissionName) {
        this.resourceId = resourceId;
        this.parentResourceId = parentResourceId;
        this.permissionId = permissionId;
        this.permissionName = permissionName;
    }

    public void addSubs(ResourcePermissionVo rp) {
        subs.add(rp);
    }
}
